import Vue from 'vue';
import Vant from 'vant';
import 'vant/lib/index.css';
import App from './App.vue';
import router from './router';
import { serveURL } from './tools/util';

Vue.config.productionTip = false;
Vue.use(Vant);

Vue.filter('filterImage', (url) => {
  if (url) {
    if (url.startsWith('http')) {
      return url;
    }
    return serveURL + url;
  }
  return 'https://img1.baidu.com/it/u=2414932104,2696854668&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=500';
});
new Vue({
  router,
  render: (h) => h(App),
}).$mount('#app');
